home *** CD-ROM | disk | FTP | other *** search
Unknown | 2004-01-13 | 10.9 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 6e ad 01 2f 2f 20 3d 3d |........|n..// ==|
|00000010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000020| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000050| 3d 3d 0d 0a 2f 2f 20 20 | 43 6c 61 73 73 3a 20 20 |==..// |Class: |
|00000060| 47 55 49 2e 47 55 49 4d | 75 6c 74 69 43 6f 6d 70 |GUI.GUIM|ultiComp|
|00000070| 6f 6e 65 6e 74 0d 0a 2f | 2f 0d 0a 2f 2f 09 47 55 |onent../|/..//.GU|
|00000080| 49 4d 75 6c 74 69 43 6f | 6d 70 6f 6e 65 6e 74 73 |IMultiCo|mponents|
|00000090| 20 61 72 65 20 63 6f 6c | 6c 65 63 74 69 6f 6e 73 | are col|lections|
|000000a0| 20 6f 66 20 63 6f 6d 70 | 6f 6e 65 6e 74 73 20 74 | of comp|onents t|
|000000b0| 68 61 74 20 77 6f 72 6b | 20 74 6f 67 65 74 68 65 |hat work| togethe|
|000000c0| 72 2e 0d 0a 2f 2f 20 20 | 57 68 65 6e 20 69 6e 69 |r...// |When ini|
|000000d0| 74 69 61 6c 69 7a 65 64 | 2c 20 47 55 49 4d 75 6c |tialized|, GUIMul|
|000000e0| 74 69 43 6f 6d 70 6f 6e | 65 6e 74 73 20 74 72 61 |tiCompon|ents tra|
|000000f0| 6e 73 66 65 72 20 61 6c | 6c 20 6f 66 20 74 68 65 |nsfer al|l of the|
|00000100| 69 72 20 63 6f 6d 70 6f | 6e 65 6e 74 73 0d 0a 2f |ir compo|nents../|
|00000110| 2f 09 74 6f 20 74 68 65 | 20 74 6f 20 74 68 65 20 |/.to the| to the |
|00000120| 47 55 49 50 61 67 65 20 | 74 68 61 74 20 6f 77 6e |GUIPage |that own|
|00000130| 73 20 74 68 65 6d 2e 0d | 0a 2f 2f 0d 0a 2f 2f 20 |s them..|.//..// |
|00000140| 20 57 72 69 74 74 65 6e | 20 62 79 20 4a 6f 65 20 | Written| by Joe |
|00000150| 57 69 6c 63 6f 78 0d 0a | 2f 2f 20 20 28 63 29 20 |Wilcox..|// (c) |
|00000160| 32 30 30 32 2c 20 45 70 | 69 63 20 47 61 6d 65 73 |2002, Ep|ic Games|
|00000170| 2c 20 49 6e 63 2e 20 20 | 41 6c 6c 20 52 69 67 68 |, Inc. |All Righ|
|00000180| 74 73 20 52 65 73 65 72 | 76 65 64 0d 0a 2f 2f 20 |ts Reser|ved..// |
|00000190| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000001a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000001b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000001c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000001d0| 3d 3d 3d 3d 0d 0a 0d 0a | 63 6c 61 73 73 20 47 55 |====....|class GU|
|000001e0| 49 4d 75 6c 74 69 43 6f | 6d 70 6f 6e 65 6e 74 20 |IMultiCo|mponent |
|000001f0| 65 78 74 65 6e 64 73 20 | 47 55 49 43 6f 6d 70 6f |extends |GUICompo|
|00000200| 6e 65 6e 74 0d 0a 09 09 | 4e 61 74 69 76 65 3b 0d |nent....|Native;.|
|00000210| 0a 0d 0a 2f 2f 20 28 63 | 70 70 74 65 78 74 29 0d |...// (c|pptext).|
|00000220| 0a 2f 2f 20 28 63 70 70 | 74 65 78 74 29 0d 0a 2f |.// (cpp|text)../|
|00000230| 2f 20 28 63 70 70 74 65 | 78 74 29 0d 0a 2f 2f 20 |/ (cppte|xt)..// |
|00000240| 28 63 70 70 74 65 78 74 | 29 0d 0a 2f 2f 20 28 63 |(cpptext|)..// (c|
|00000250| 70 70 74 65 78 74 29 0d | 0a 2f 2f 20 28 63 70 70 |pptext).|.// (cpp|
|00000260| 74 65 78 74 29 0d 0a 2f | 2f 20 28 63 70 70 74 65 |text)../|/ (cppte|
|00000270| 78 74 29 0d 0a 2f 2f 20 | 28 63 70 70 74 65 78 74 |xt)..// |(cpptext|
|00000280| 29 0d 0a 2f 2f 20 28 63 | 70 70 74 65 78 74 29 0d |)..// (c|pptext).|
|00000290| 0a 2f 2f 20 28 63 70 70 | 74 65 78 74 29 0d 0a 2f |.// (cpp|text)../|
|000002a0| 2f 20 28 63 70 70 74 65 | 78 74 29 0d 0a 2f 2f 20 |/ (cppte|xt)..// |
|000002b0| 28 63 70 70 74 65 78 74 | 29 0d 0a 2f 2f 20 28 63 |(cpptext|)..// (c|
|000002c0| 70 70 74 65 78 74 29 0d | 0a 2f 2f 20 28 63 70 70 |pptext).|.// (cpp|
|000002d0| 74 65 78 74 29 0d 0a 2f | 2f 20 28 63 70 70 74 65 |text)../|/ (cppte|
|000002e0| 78 74 29 0d 0a 2f 2f 20 | 28 63 70 70 74 65 78 74 |xt)..// |(cpptext|
|000002f0| 29 0d 0a 2f 2f 20 28 63 | 70 70 74 65 78 74 29 0d |)..// (c|pptext).|
|00000300| 0a 2f 2f 20 28 63 70 70 | 74 65 78 74 29 0d 0a 2f |.// (cpp|text)../|
|00000310| 2f 20 28 63 70 70 74 65 | 78 74 29 0d 0a 2f 2f 20 |/ (cppte|xt)..// |
|00000320| 28 63 70 70 74 65 78 74 | 29 0d 0a 2f 2f 20 28 63 |(cpptext|)..// (c|
|00000330| 70 70 74 65 78 74 29 0d | 0a 2f 2f 20 28 63 70 70 |pptext).|.// (cpp|
|00000340| 74 65 78 74 29 0d 0a 2f | 2f 20 28 63 70 70 74 65 |text)../|/ (cppte|
|00000350| 78 74 29 0d 0a 2f 2f 20 | 28 63 70 70 74 65 78 74 |xt)..// |(cpptext|
|00000360| 29 0d 0a 0d 0a 76 61 72 | 09 09 61 72 72 61 79 3c |)....var|..array<|
|00000370| 47 55 49 43 6f 6d 70 6f | 6e 65 6e 74 3e 09 09 43 |GUICompo|nent>..C|
|00000380| 6f 6e 74 72 6f 6c 73 3b | 09 09 09 09 2f 2f 20 41 |ontrols;|....// A|
|00000390| 6e 20 41 72 72 61 79 20 | 6f 66 20 43 6f 6d 70 6f |n Array |of Compo|
|000003a0| 6e 65 6e 74 73 20 74 68 | 61 74 20 6d 61 6b 65 20 |nents th|at make |
|000003b0| 75 70 20 74 68 69 73 20 | 43 6f 6e 74 72 6f 6c 0d |up this |Control.|
|000003c0| 0a 76 61 72 20 09 61 72 | 72 61 79 3c 47 55 49 43 |.var .ar|ray<GUIC|
|000003d0| 6f 6d 70 6f 6e 65 6e 74 | 3e 09 09 43 6f 6d 70 6f |omponent|>..Compo|
|000003e0| 6e 65 6e 74 73 3b 09 09 | 09 09 2f 2f 20 41 6e 20 |nents;..|..// An |
|000003f0| 41 72 72 61 79 20 6f 66 | 20 43 6f 6e 74 72 6f 6c |Array of| Control|
|00000400| 73 20 74 68 61 74 20 63 | 61 6e 20 62 65 20 74 61 |s that c|an be ta|
|00000410| 62 62 65 64 20 74 6f 0d | 0a 76 61 72 09 09 47 55 |bbed to.|.var..GU|
|00000420| 49 43 6f 6d 70 6f 6e 65 | 6e 74 09 09 09 46 6f 63 |ICompone|nt...Foc|
|00000430| 75 73 65 64 43 6f 6e 74 | 72 6f 6c 3b 09 09 09 2f |usedCont|rol;.../|
|00000440| 2f 20 57 68 69 63 68 20 | 63 6f 6d 70 6f 6e 65 6e |/ Which |componen|
|00000450| 74 20 69 6e 73 69 64 65 | 20 74 68 69 73 20 6f 6e |t inside| this on|
|00000460| 65 20 68 61 73 20 66 6f | 63 75 73 0d 0a 76 61 72 |e has fo|cus..var|
|00000470| 09 09 62 6f 6f 6c 09 09 | 09 09 09 50 72 6f 70 61 |..bool..|...Propa|
|00000480| 67 61 74 65 56 69 73 69 | 62 69 6c 69 74 79 3b 09 |gateVisi|bility;.|
|00000490| 2f 2f 20 44 6f 65 73 20 | 63 68 61 6e 67 65 73 20 |// Does |changes |
|000004a0| 74 6f 20 76 69 73 69 62 | 69 6c 69 74 79 20 70 72 |to visib|ility pr|
|000004b0| 6f 70 61 67 61 74 65 20 | 64 6f 77 6e 20 74 68 65 |opagate |down the|
|000004c0| 20 6c 69 6e 65 0d 0a 0d | 0a 0d 0a 66 75 6e 63 74 | line...|...funct|
|000004d0| 69 6f 6e 20 6e 61 74 69 | 76 65 20 49 6e 69 74 69 |ion nati|ve Initi|
|000004e0| 61 6c 69 7a 65 43 6f 6e | 74 72 6f 6c 73 28 29 3b |alizeCon|trols();|
|000004f0| 0d 0a 0d 0a 2f 2f 20 53 | 74 75 62 0d 0a 66 75 6e |....// S|tub..fun|
|00000500| 63 74 69 6f 6e 20 49 6e | 74 65 72 6e 61 6c 4f 6e |ction In|ternalOn|
|00000510| 53 68 6f 77 28 29 3b 0d | 0a 0d 0a 65 76 65 6e 74 |Show();.|...event|
|00000520| 20 69 6e 74 20 46 69 6e | 64 43 6f 6d 70 6f 6e 65 | int Fin|dCompone|
|00000530| 6e 74 49 6e 64 65 78 28 | 47 55 49 43 6f 6d 70 6f |ntIndex(|GUICompo|
|00000540| 6e 65 6e 74 20 57 68 6f | 29 0d 0a 7b 0d 0a 09 6c |nent Who|)..{...l|
|00000550| 6f 63 61 6c 20 69 6e 74 | 20 69 3b 0d 0a 0d 0a 09 |ocal int| i;.....|
|00000560| 69 66 20 28 57 68 6f 20 | 21 3d 20 4e 6f 6e 65 20 |if (Who |!= None |
|00000570| 26 26 20 43 6f 6d 70 6f | 6e 65 6e 74 73 2e 4c 65 |&& Compo|nents.Le|
|00000580| 6e 67 74 68 20 3e 20 30 | 29 0d 0a 20 20 20 20 7b |ngth > 0|).. {|
|00000590| 0d 0a 09 09 66 6f 72 20 | 28 69 3d 30 3b 69 3c 43 |....for |(i=0;i<C|
|000005a0| 6f 6d 70 6f 6e 65 6e 74 | 73 2e 4c 65 6e 67 74 68 |omponent|s.Length|
|000005b0| 3b 69 2b 2b 29 0d 0a 20 | 20 20 20 20 20 20 20 7b |;i++).. | {|
|000005c0| 0d 0a 09 09 09 69 66 20 | 28 57 68 6f 3d 3d 43 6f |.....if |(Who==Co|
|000005d0| 6d 70 6f 6e 65 6e 74 73 | 5b 69 5d 29 0d 0a 09 09 |mponents|[i])....|
|000005e0| 09 09 72 65 74 75 72 6e | 20 69 3b 0d 0a 20 20 20 |..return| i;.. |
|000005f0| 20 09 7d 0d 0a 20 20 20 | 20 7d 0d 0a 0d 0a 09 72 | .}.. | }.....r|
|00000600| 65 74 75 72 6e 20 2d 31 | 3b 0d 0a 7d 0d 0a 0d 0a |eturn -1|;..}....|
|00000610| 66 75 6e 63 74 69 6f 6e | 20 49 6e 69 74 43 6f 6d |function| InitCom|
|00000620| 70 6f 6e 65 6e 74 28 47 | 55 49 43 6f 6e 74 72 6f |ponent(G|UIContro|
|00000630| 6c 6c 65 72 20 4d 79 43 | 6f 6e 74 72 6f 6c 6c 65 |ller MyC|ontrolle|
|00000640| 72 2c 20 47 55 49 43 6f | 6d 70 6f 6e 65 6e 74 20 |r, GUICo|mponent |
|00000650| 4d 79 4f 77 6e 65 72 29 | 0d 0a 7b 0d 0a 09 6c 6f |MyOwner)|..{...lo|
|00000660| 63 61 6c 20 69 6e 74 20 | 69 3b 0d 0a 0d 0a 09 53 |cal int |i;.....S|
|00000670| 75 70 65 72 2e 49 6e 69 | 74 63 6f 6d 70 6f 6e 65 |uper.Ini|tcompone|
|00000680| 6e 74 28 4d 79 43 6f 6e | 74 72 6f 6c 6c 65 72 2c |nt(MyCon|troller,|
|00000690| 20 4d 79 4f 77 6e 65 72 | 29 3b 0d 0a 0d 0a 09 2f | MyOwner|);...../|
|000006a0| 2f 20 53 65 74 20 4f 6e | 53 68 6f 77 20 64 65 6c |/ Set On|Show del|
|000006b0| 65 67 61 74 65 20 2d 20 | 53 65 74 56 69 73 69 62 |egate - |SetVisib|
|000006c0| 69 6c 69 74 79 20 77 69 | 6c 6c 20 62 65 20 63 61 |ility wi|ll be ca|
|000006d0| 6c 6c 65 64 20 69 6e 20 | 6e 65 78 74 20 73 74 65 |lled in |next ste|
|000006e0| 70 0d 0a 09 4f 6e 53 68 | 6f 77 20 3d 20 49 6e 74 |p...OnSh|ow = Int|
|000006f0| 65 72 6e 61 6c 4f 6e 53 | 68 6f 77 3b 0d 0a 0d 0a |ernalOnS|how;....|
|00000700| 20 20 20 20 49 6e 69 74 | 69 61 6c 69 7a 65 43 6f | Init|ializeCo|
|00000710| 6e 74 72 6f 6c 73 28 29 | 3b 09 2f 2f 20 42 75 69 |ntrols()|;.// Bui|
|00000720| 6c 64 20 74 68 65 20 43 | 6f 6e 74 72 6f 6c 73 20 |ld the C|ontrols |
|00000730| 61 72 72 61 79 0d 0a 09 | 66 6f 72 20 28 69 3d 30 |array...|for (i=0|
|00000740| 3b 69 3c 43 6f 6e 74 72 | 6f 6c 73 2e 4c 65 6e 67 |;i<Contr|ols.Leng|
|00000750| 74 68 3b 69 2b 2b 29 0d | 0a 09 7b 0d 0a 09 09 69 |th;i++).|..{....i|
|00000760| 66 20 28 43 6f 6e 74 72 | 6f 6c 73 5b 69 5d 20 3d |f (Contr|ols[i] =|
|00000770| 3d 20 4e 6f 6e 65 29 0d | 0a 09 09 7b 0d 0a 09 09 |= None).|...{....|
|00000780| 09 6c 6f 67 28 22 49 6e | 76 61 6c 69 64 20 63 6f |.log("In|valid co|
|00000790| 6e 74 72 6f 6c 20 66 6f | 75 6e 64 20 69 6e 22 40 |ntrol fo|und in"@|
|000007a0| 73 74 72 69 6e 67 28 43 | 6c 61 73 73 29 24 22 21 |string(C|lass)$"!|
|000007b0| 21 20 28 43 6f 6e 74 72 | 6f 6c 22 40 69 24 22 29 |! (Contr|ol"@i$")|
|000007c0| 22 2c 27 47 55 49 20 45 | 52 52 4f 52 27 29 3b 0d |",'GUI E|RROR');.|
|000007d0| 0a 09 09 09 43 6f 6e 74 | 72 6f 6c 73 2e 52 65 6d |....Cont|rols.Rem|
|000007e0| 6f 76 65 28 69 2d 2d 2c | 31 29 3b 0d 0a 09 09 09 |ove(i--,|1);.....|
|000007f0| 63 6f 6e 74 69 6e 75 65 | 3b 0d 0a 09 09 7d 0d 0a |continue|;....}..|
|00000800| 09 09 43 6f 6e 74 72 6f | 6c 73 5b 69 5d 2e 49 6e |..Contro|ls[i].In|
|00000810| 69 74 43 6f 6d 70 6f 6e | 65 6e 74 28 4d 79 43 6f |itCompon|ent(MyCo|
|00000820| 6e 74 72 6f 6c 6c 65 72 | 2c 20 53 65 6c 66 29 3b |ntroller|, Self);|
|00000830| 0d 0a 09 7d 0d 0a 0d 0a | 20 20 20 20 2f 2f 20 50 |...}....| // P|
|00000840| 72 6f 70 61 67 61 74 65 | 20 73 6f 6d 65 20 64 65 |ropagate| some de|
|00000850| 66 61 75 6c 74 73 0d 0a | 20 20 20 20 69 66 20 28 |faults..| if (|
|00000860| 50 72 6f 70 61 67 61 74 | 65 56 69 73 69 62 69 6c |Propagat|eVisibil|
|00000870| 69 74 79 29 0d 0a 20 20 | 20 20 09 53 65 74 56 69 |ity).. | .SetVi|
|00000880| 73 69 62 69 6c 69 74 79 | 28 62 56 69 73 69 62 6c |sibility|(bVisibl|
|00000890| 65 29 3b 0d 0a 0d 0a 20 | 20 20 20 52 65 6d 61 70 |e);.... | Remap|
|000008a0| 43 6f 6d 70 6f 6e 65 6e | 74 73 28 29 3b 0d 0a 0d |Componen|ts();...|
|000008b0| 0a 7d 0d 0a 0d 0a 65 76 | 65 6e 74 20 47 55 49 43 |.}....ev|ent GUIC|
|000008c0| 6f 6d 70 6f 6e 65 6e 74 | 20 41 64 64 43 6f 6d 70 |omponent| AddComp|
|000008d0| 6f 6e 65 6e 74 28 73 74 | 72 69 6e 67 20 43 6f 6d |onent(st|ring Com|
|000008e0| 70 6f 6e 65 6e 74 43 6c | 61 73 73 29 0d 0a 7b 0d |ponentCl|ass)..{.|
|000008f0| 0a 20 20 20 20 6c 6f 63 | 61 6c 20 63 6c 61 73 73 |. loc|al class|
|00000900| 3c 47 55 49 43 6f 6d 70 | 6f 6e 65 6e 74 3e 20 4e |<GUIComp|onent> N|
|00000910| 65 77 43 6f 6d 70 43 6c | 61 73 73 3b 0d 0a 20 20 |ewCompCl|ass;.. |
|00000920| 20 20 6c 6f 63 61 6c 20 | 47 55 49 43 6f 6d 70 6f | local |GUICompo|
|00000930| 6e 65 6e 74 20 4e 65 77 | 43 6f 6d 70 3b 0d 0a 0d |nent New|Comp;...|
|00000940| 0a 20 20 20 20 4e 65 77 | 43 6f 6d 70 43 6c 61 73 |. New|CompClas|
|00000950| 73 20 3d 20 63 6c 61 73 | 73 3c 47 55 49 43 6f 6d |s = clas|s<GUICom|
|00000960| 70 6f 6e 65 6e 74 3e 28 | 44 79 6e 61 6d 69 63 4c |ponent>(|DynamicL|
|00000970| 6f 61 64 4f 62 6a 65 63 | 74 28 43 6f 6d 70 6f 6e |oadObjec|t(Compon|
|00000980| 65 6e 74 43 6c 61 73 73 | 2c 63 6c 61 73 73 27 63 |entClass|,class'c|
|00000990| 6c 61 73 73 27 29 29 3b | 0d 0a 20 20 20 20 69 66 |lass'));|.. if|
|000009a0| 20 28 4e 65 77 43 6f 6d | 70 43 6c 61 73 73 20 21 | (NewCom|pClass !|
|000009b0| 3d 20 4e 6f 6e 65 29 0d | 0a 20 20 20 20 7b 0d 0a |= None).|. {..|
|000009c0| 0d 0a 20 20 20 20 20 20 | 20 20 4e 65 77 43 6f 6d |.. | NewCom|
|000009d0| 70 20 3d 20 6e 65 77 28 | 4e 6f 6e 65 29 20 4e 65 |p = new(|None) Ne|
|000009e0| 77 43 6f 6d 70 43 6c 61 | 73 73 3b 0d 0a 20 20 20 |wCompCla|ss;.. |
|000009f0| 20 20 20 20 20 69 66 20 | 28 4e 65 77 43 6f 6d 70 | if |(NewComp|
|00000a00| 21 3d 4e 6f 6e 65 29 0d | 0a 20 20 20 20 20 20 20 |!=None).|. |
|00000a10| 20 7b 0d 0a 20 20 20 20 | 20 20 20 20 09 4e 65 77 | {.. | .New|
|00000a20| 43 6f 6d 70 20 3d 20 41 | 70 70 65 6e 64 43 6f 6d |Comp = A|ppendCom|
|00000a30| 70 6f 6e 65 6e 74 28 4e | 65 77 43 6f 6d 70 29 3b |ponent(N|ewComp);|
|00000a40| 0d 0a 09 09 09 72 65 74 | 75 72 6e 20 4e 65 77 43 |.....ret|urn NewC|
|00000a50| 6f 6d 70 3b 0d 0a 20 20 | 20 20 20 20 20 20 7d 0d |omp;.. | }.|
|00000a60| 0a 20 20 20 20 7d 0d 0a | 0d 0a 20 20 20 20 6c 6f |. }..|.. lo|
|00000a70| 67 28 22 47 55 49 4d 75 | 6c 74 69 43 6f 6d 70 6f |g("GUIMu|ltiCompo|
|00000a80| 6e 65 6e 74 3a 3a 41 64 | 64 43 6f 6d 70 6f 6e 65 |nent::Ad|dCompone|
|00000a90| 6e 74 20 2d 20 43 6f 75 | 6c 64 20 6e 6f 74 20 63 |nt - Cou|ld not c|
|00000aa0| 72 65 61 74 65 20 63 6f | 6d 70 6f 6e 65 6e 74 22 |reate co|mponent"|
|00000ab0| 40 43 6f 6d 70 6f 6e 65 | 6e 74 43 6c 61 73 73 2c |@Compone|ntClass,|
|00000ac0| 27 47 55 49 27 29 3b 0d | 0a 09 72 65 74 75 72 6e |'GUI');.|..return|
|00000ad0| 20 6e 6f 6e 65 3b 0d 0a | 7d 0d 0a 0d 0a 65 76 65 | none;..|}....eve|
|00000ae0| 6e 74 20 47 55 49 43 6f | 6d 70 6f 6e 65 6e 74 20 |nt GUICo|mponent |
|00000af0| 49 6e 73 65 72 74 43 6f | 6d 70 6f 6e 65 6e 74 28 |InsertCo|mponent(|
|00000b00| 47 55 49 43 6f 6d 70 6f | 6e 65 6e 74 20 4e 65 77 |GUICompo|nent New|
|00000b10| 43 6f 6d 70 2c 20 69 6e | 74 20 49 6e 64 65 78 29 |Comp, in|t Index)|
|00000b20| 0d 0a 7b 0d 0a 09 69 66 | 20 28 49 6e 64 65 78 20 |..{...if| (Index |
|00000b30| 3c 20 30 20 7c 7c 20 49 | 6e 64 65 78 20 3e 3d 20 |< 0 || I|ndex >= |
|00000b40| 43 6f 6e 74 72 6f 6c 73 | 2e 4c 65 6e 67 74 68 29 |Controls|.Length)|
|00000b50| 0d 0a 09 09 72 65 74 75 | 72 6e 20 41 70 70 65 6e |....retu|rn Appen|
|00000b60| 64 43 6f 6d 70 6f 6e 65 | 6e 74 28 4e 65 77 43 6f |dCompone|nt(NewCo|
|00000b70| 6d 70 29 3b 0d 0a 0d 0a | 09 43 6f 6e 74 72 6f 6c |mp);....|.Control|
|00000b80| 73 2e 49 6e 73 65 72 74 | 28 49 6e 64 65 78 2c 20 |s.Insert|(Index, |
|00000b90| 31 29 3b 0d 0a 09 43 6f | 6e 74 72 6f 6c 73 5b 49 |1);...Co|ntrols[I|
|00000ba0| 6e 64 65 78 5d 20 3d 20 | 4e 65 77 43 6f 6d 70 3b |ndex] = |NewComp;|
|00000bb0| 0d 0a 09 52 65 6d 61 70 | 43 6f 6d 70 6f 6e 65 6e |...Remap|Componen|
|00000bc0| 74 73 28 29 3b 0d 0a 09 | 72 65 74 75 72 6e 20 4e |ts();...|return N|
|00000bd0| 65 77 43 6f 6d 70 3b 0d | 0a 7d 0d 0a 0d 0a 65 76 |ewComp;.|.}....ev|
|00000be0| 65 6e 74 20 47 55 49 43 | 6f 6d 70 6f 6e 65 6e 74 |ent GUIC|omponent|
|00000bf0| 20 41 70 70 65 6e 64 43 | 6f 6d 70 6f 6e 65 6e 74 | AppendC|omponent|
|00000c00| 28 47 55 49 43 6f 6d 70 | 6f 6e 65 6e 74 20 4e 65 |(GUIComp|onent Ne|
|00000c10| 77 43 6f 6d 70 29 0d 0a | 7b 0d 0a 09 6c 6f 63 61 |wComp)..|{...loca|
|00000c20| 6c 20 69 6e 74 20 69 6e | 64 65 78 3b 0d 0a 0d 0a |l int in|dex;....|
|00000c30| 20 20 20 20 2f 2f 20 41 | 74 74 65 6d 70 74 20 74 | // A|ttempt t|
|00000c40| 6f 20 61 64 64 20 69 74 | 20 73 6f 72 74 65 64 20 |o add it| sorted |
|00000c50| 69 6e 20 74 6f 20 74 68 | 65 20 61 72 72 61 79 2e |in to th|e array.|
|00000c60| 20 20 54 68 65 20 43 6f | 6e 74 72 6f 6c 73 20 61 | The Co|ntrols a|
|00000c70| 72 72 61 79 20 69 73 20 | 73 6f 72 74 65 64 20 62 |rray is |sorted b|
|00000c80| 79 0d 0a 20 20 20 20 2f | 2f 20 52 65 6e 64 65 72 |y.. /|/ Render|
|00000c90| 20 57 65 69 67 68 74 2e | 0d 0a 0d 0a 20 20 20 20 | Weight.|.... |
|00000ca0| 77 68 69 6c 65 20 28 49 | 6e 64 65 78 3c 43 6f 6e |while (I|ndex<Con|
|00000cb0| 74 72 6f 6c 73 2e 4c 65 | 6e 67 74 68 29 0d 0a 20 |trols.Le|ngth).. |
|00000cc0| 20 20 20 7b 0d 0a 20 20 | 20 20 09 69 66 20 28 4e | {.. | .if (N|
|00000cd0| 65 77 43 6f 6d 70 2e 52 | 65 6e 64 65 72 57 65 69 |ewComp.R|enderWei|
|00000ce0| 67 68 74 20 3c 3d 20 43 | 6f 6e 74 72 6f 6c 73 5b |ght <= C|ontrols[|
|00000cf0| 49 6e 64 65 78 5d 2e 52 | 65 6e 64 65 72 57 65 69 |Index].R|enderWei|
|00000d00| 67 68 74 29 09 2f 2f 20 | 57 65 20 66 6f 75 6e 64 |ght).// |We found|
|00000d10| 20 6f 75 72 20 73 70 6f | 74 0d 0a 20 20 20 20 20 | our spo|t.. |
|00000d20| 20 20 20 7b 0d 0a 09 09 | 09 43 6f 6e 74 72 6f 6c | {....|.Control|
|00000d30| 73 2e 49 6e 73 65 72 74 | 28 49 6e 64 65 78 2c 31 |s.Insert|(Index,1|
|00000d40| 29 3b 0d 0a 09 09 09 62 | 72 65 61 6b 3b 0d 0a 20 |);.....b|reak;.. |
|00000d50| 20 20 20 20 20 20 20 7d | 0d 0a 20 20 20 20 20 20 | }|.. |
|00000d60| 20 20 49 6e 64 65 78 2b | 2b 3b 0d 0a 20 20 20 20 | Index+|+;.. |
|00000d70| 7d 0d 0a 0d 0a 20 20 20 | 20 2f 2f 20 43 6f 75 6c |}.... | // Coul|
|00000d80| 64 6e 27 74 20 66 69 6e | 64 20 61 20 73 70 6f 74 |dn't fin|d a spot|
|00000d90| 2c 20 61 64 64 20 69 74 | 20 61 74 20 74 68 65 20 |, add it| at the |
|00000da0| 65 6e 64 0d 0a 20 20 20 | 20 43 6f 6e 74 72 6f 6c |end.. | Control|
|00000db0| 73 5b 49 6e 64 65 78 5d | 20 3d 20 4e 65 77 43 6f |s[Index]| = NewCo|
|00000dc0| 6d 70 3b 0d 0a 20 20 20 | 09 4e 65 77 43 6f 6d 70 |mp;.. |.NewComp|
|00000dd0| 2e 49 6e 69 74 43 6f 6d | 70 6f 6e 65 6e 74 28 43 |.InitCom|ponent(C|
|00000de0| 6f 6e 74 72 6f 6c 6c 65 | 72 2c 20 53 65 6c 66 29 |ontrolle|r, Self)|
|00000df0| 3b 0d 0a 09 52 65 6d 61 | 70 43 6f 6d 70 6f 6e 65 |;...Rema|pCompone|
|00000e00| 6e 74 73 28 29 3b 0d 0a | 20 20 20 20 72 65 74 75 |nts();..| retu|
|00000e10| 72 6e 20 4e 65 77 43 6f | 6d 70 3b 0d 0a 7d 0d 0a |rn NewCo|mp;..}..|
|00000e20| 0d 0a 65 76 65 6e 74 20 | 62 6f 6f 6c 20 52 65 6d |..event |bool Rem|
|00000e30| 6f 76 65 43 6f 6d 70 6f | 6e 65 6e 74 28 47 55 49 |oveCompo|nent(GUI|
|00000e40| 43 6f 6d 70 6f 6e 65 6e | 74 20 43 6f 6d 70 2c 20 |Componen|t Comp, |
|00000e50| 6f 70 74 69 6f 6e 61 6c | 20 62 6f 6f 6c 20 62 52 |optional| bool bR|
|00000e60| 65 6d 61 70 29 0d 0a 7b | 0d 0a 09 6c 6f 63 61 6c |emap)..{|...local|
|00000e70| 20 69 6e 74 20 69 3b 0d | 0a 20 20 20 20 66 6f 72 | int i;.|. for|
|00000e80| 20 28 69 3d 30 3b 69 3c | 43 6f 6e 74 72 6f 6c 73 | (i=0;i<|Controls|
|00000e90| 2e 4c 65 6e 67 74 68 3b | 69 2b 2b 29 0d 0a 20 20 |.Length;|i++).. |
|00000ea0| 20 20 7b 0d 0a 09 09 69 | 66 20 28 43 6f 6e 74 72 | {....i|f (Contr|
|00000eb0| 6f 6c 73 5b 69 5d 20 3d | 3d 20 43 6f 6d 70 29 0d |ols[i] =|= Comp).|
|00000ec0| 0a 20 20 20 20 20 20 20 | 20 7b 0d 0a 20 20 20 20 |. | {.. |
|00000ed0| 20 20 20 20 09 43 6f 6e | 74 72 6f 6c 73 2e 52 65 | .Con|trols.Re|
|00000ee0| 6d 6f 76 65 28 69 2c 31 | 29 3b 0d 0a 20 20 20 20 |move(i,1|);.. |
|00000ef0| 20 20 20 20 09 69 66 20 | 28 62 52 65 6d 61 70 29 | .if |(bRemap)|
|00000f00| 0d 0a 09 20 20 20 20 20 | 20 20 20 09 52 65 6d 61 |... | .Rema|
|00000f10| 70 43 6f 6d 70 6f 6e 65 | 6e 74 73 28 29 3b 0d 0a |pCompone|nts();..|
|00000f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 72 65 74 75 | | retu|
|00000f30| 72 6e 20 74 72 75 65 3b | 0d 0a 20 20 20 20 20 20 |rn true;|.. |
|00000f40| 20 20 7d 0d 0a 09 7d 0d | 0a 20 20 20 20 72 65 74 | }...}.|. ret|
|00000f50| 75 72 6e 20 66 61 6c 73 | 65 3b 0d 0a 7d 0d 0a 0d |urn fals|e;..}...|
|00000f60| 0a 66 75 6e 63 74 69 6f | 6e 20 46 69 6e 64 43 65 |.functio|n FindCe|
|00000f70| 6e 74 65 72 50 6f 69 6e | 74 28 47 55 49 43 6f 6d |nterPoin|t(GUICom|
|00000f80| 70 6f 6e 65 6e 74 20 57 | 68 61 74 2c 20 6f 75 74 |ponent W|hat, out|
|00000f90| 20 66 6c 6f 61 74 20 58 | 2c 20 6f 75 74 20 66 6c | float X|, out fl|
|00000fa0| 6f 61 74 20 59 29 0d 0a | 7b 0d 0a 09 58 20 3d 20 |oat Y)..|{...X = |
|00000fb0| 57 68 61 74 2e 41 63 74 | 75 61 6c 4c 65 66 74 28 |What.Act|ualLeft(|
|00000fc0| 29 20 2b 20 28 57 68 61 | 74 2e 41 63 74 75 61 6c |) + (Wha|t.Actual|
|00000fd0| 57 69 64 74 68 28 29 2f | 32 29 3b 0d 0a 20 20 20 |Width()/|2);.. |
|00000fe0| 20 59 20 3d 20 57 68 61 | 74 2e 41 63 74 75 61 6c | Y = Wha|t.Actual|
|00000ff0| 54 6f 70 28 29 20 2b 20 | 28 57 68 61 74 2e 41 63 |Top() + |(What.Ac|
|00001000| 74 75 61 6c 48 65 69 67 | 68 74 28 29 2f 32 29 3b |tualHeig|ht()/2);|
|00001010| 0d 0a 7d 0d 0a 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |..}....f|unction |
|00001020| 66 6c 6f 61 74 20 46 69 | 6e 64 44 69 73 74 28 47 |float Fi|ndDist(G|
|00001030| 55 49 43 6f 6d 70 6f 6e | 65 6e 74 20 53 6f 75 72 |UICompon|ent Sour|
|00001040| 63 65 2c 20 47 55 49 43 | 6f 6d 70 6f 6e 65 6e 74 |ce, GUIC|omponent|
|00001050| 20 54 61 72 67 65 74 29 | 0d 0a 7b 0d 0a 09 6c 6f | Target)|..{...lo|
|00001060| 63 61 6c 20 66 6c 6f 61 | 74 20 61 2c 62 3b 0d 0a |cal floa|t a,b;..|
|00001070| 20 20 20 20 6c 6f 63 61 | 6c 20 66 6c 6f 61 74 20 | loca|l float |
|00001080| 78 5b 32 5d 2c 79 5b 32 | 5d 3b 0d 0a 0d 0a 20 20 |x[2],y[2|];.... |
|00001090| 20 20 46 69 6e 64 43 65 | 6e 74 65 72 50 6f 69 6e | FindCe|nterPoin|
|000010a0| 74 28 53 6f 75 72 63 65 | 2c 78 5b 30 5d 2c 79 5b |t(Source|,x[0],y[|
|000010b0| 30 5d 29 3b 0d 0a 20 20 | 20 20 46 69 6e 64 43 65 |0]);.. | FindCe|
|000010c0| 6e 74 65 72 50 6f 69 6e | 74 28 54 61 72 67 65 74 |nterPoin|t(Target|
|000010d0| 2c 78 5b 31 5d 2c 79 5b | 31 5d 29 3b 0d 0a 0d 0a |,x[1],y[|1]);....|
|000010e0| 20 20 09 61 20 3d 20 61 | 62 73 28 78 5b 30 5d 2d | .a = a|bs(x[0]-|
|000010f0| 78 5b 31 5d 29 3b 0d 0a | 20 20 20 20 61 20 3d 20 |x[1]);..| a = |
|00001100| 73 71 75 61 72 65 28 61 | 29 3b 0d 0a 20 20 20 20 |square(a|);.. |
|00001110| 62 20 3d 20 61 62 73 28 | 79 5b 30 5d 2d 79 5b 31 |b = abs(|y[0]-y[1|
|00001120| 5d 29 3b 0d 0a 20 20 20 | 20 62 20 3d 20 73 71 75 |]);.. | b = squ|
|00001130| 61 72 65 28 62 29 3b 0d | 0a 0d 0a 20 20 20 20 72 |are(b);.|... r|
|00001140| 65 74 75 72 6e 20 73 71 | 72 74 28 61 2b 62 29 3b |eturn sq|rt(a+b);|
|00001150| 0d 0a 7d 0d 0a 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |..}....f|unction |
|00001160| 62 6f 6f 6c 20 54 65 73 | 74 43 6f 6e 74 72 6f 6c |bool Tes|tControl|
|00001170| 73 28 69 6e 74 20 4d 6f | 64 65 2c 20 69 6e 74 20 |s(int Mo|de, int |
|00001180| 53 6f 75 72 63 65 49 6e | 64 65 78 2c 20 69 6e 74 |SourceIn|dex, int|
|00001190| 20 54 61 72 67 65 74 49 | 6e 64 65 78 29 0d 0a 7b | TargetI|ndex)..{|
|000011a0| 0d 0a 09 6c 6f 63 61 6c | 20 66 6c 6f 61 74 20 73 |...local| float s|
|000011b0| 58 31 2c 73 59 31 2c 73 | 58 32 2c 73 59 32 3b 0d |X1,sY1,s|X2,sY2;.|
|000011c0| 0a 20 20 20 20 6c 6f 63 | 61 6c 20 66 6c 6f 61 74 |. loc|al float|
|000011d0| 20 74 58 31 2c 74 59 31 | 2c 74 58 32 2c 74 59 32 | tX1,tY1|,tX2,tY2|
|000011e0| 3b 0d 0a 0d 0a 09 69 66 | 20 28 53 6f 75 72 63 65 |;.....if| (Source|
|000011f0| 49 6e 64 65 78 3d 3d 54 | 61 72 67 65 74 49 6e 64 |Index==T|argetInd|
|00001200| 65 78 29 0d 0a 20 20 20 | 20 09 72 65 74 75 72 6e |ex).. | .return|
|00001210| 20 66 61 6c 73 65 3b 0d | 0a 0d 0a 20 20 20 20 69 | false;.|... i|
|00001220| 66 20 28 43 6f 6e 74 72 | 6f 6c 73 5b 54 61 72 67 |f (Contr|ols[Targ|
|00001230| 65 74 49 6e 64 65 78 5d | 2e 62 4e 65 76 65 72 46 |etIndex]|.bNeverF|
|00001240| 6f 63 75 73 29 0d 0a 20 | 20 20 20 09 72 65 74 75 |ocus).. | .retu|
|00001250| 72 6e 20 66 61 6c 73 65 | 3b 0d 0a 0d 0a 09 73 58 |rn false|;.....sX|
|00001260| 31 20 3d 20 43 6f 6e 74 | 72 6f 6c 73 5b 53 6f 75 |1 = Cont|rols[Sou|
|00001270| 72 63 65 49 6e 64 65 78 | 5d 2e 41 63 74 75 61 6c |rceIndex|].Actual|
|00001280| 4c 65 66 74 28 29 3b 0d | 0a 20 20 20 20 73 58 32 |Left();.|. sX2|
|00001290| 20 3d 20 73 58 31 20 2b | 20 43 6f 6e 74 72 6f 6c | = sX1 +| Control|
|000012a0| 73 5b 53 6f 75 72 63 65 | 49 6e 64 65 78 5d 2e 41 |s[Source|Index].A|
|000012b0| 63 74 75 61 6c 57 69 64 | 74 68 28 29 3b 0d 0a 09 |ctualWid|th();...|
|000012c0| 73 59 31 20 3d 20 43 6f | 6e 74 72 6f 6c 73 5b 53 |sY1 = Co|ntrols[S|
|000012d0| 6f 75 72 63 65 49 6e 64 | 65 78 5d 2e 41 63 74 75 |ourceInd|ex].Actu|
|000012e0| 61 6c 54 6f 70 28 29 3b | 0d 0a 20 20 20 20 73 59 |alTop();|.. sY|
|000012f0| 32 20 3d 20 73 59 31 20 | 2b 20 43 6f 6e 74 72 6f |2 = sY1 |+ Contro|
|00001300| 6c 73 5b 53 6f 75 72 63 | 65 49 6e 64 65 78 5d 2e |ls[Sourc|eIndex].|
|00001310| 41 63 74 75 61 6c 48 65 | 69 67 68 74 28 29 3b 0d |ActualHe|ight();.|
|00001320| 0a 0d 0a 09 74 58 31 20 | 3d 20 43 6f 6e 74 72 6f |....tX1 |= Contro|
|00001330| 6c 73 5b 54 61 72 67 65 | 74 49 6e 64 65 78 5d 2e |ls[Targe|tIndex].|
|00001340| 41 63 74 75 61 6c 4c 65 | 66 74 28 29 3b 0d 0a 20 |ActualLe|ft();.. |
|00001350| 20 20 20 74 58 32 20 3d | 20 74 58 31 20 2b 20 43 | tX2 =| tX1 + C|
|00001360| 6f 6e 74 72 6f 6c 73 5b | 54 61 72 67 65 74 49 6e |ontrols[|TargetIn|
|00001370| 64 65 78 5d 2e 41 63 74 | 75 61 6c 57 69 64 74 68 |dex].Act|ualWidth|
|00001380| 28 29 3b 0d 0a 09 74 59 | 31 20 3d 20 43 6f 6e 74 |();...tY|1 = Cont|
|00001390| 72 6f 6c 73 5b 54 61 72 | 67 65 74 49 6e 64 65 78 |rols[Tar|getIndex|
|000013a0| 5d 2e 41 63 74 75 61 6c | 54 6f 70 28 29 3b 0d 0a |].Actual|Top();..|
|000013b0| 20 20 20 20 74 59 32 20 | 3d 20 74 59 31 20 2b 20 | tY2 |= tY1 + |
|000013c0| 43 6f 6e 74 72 6f 6c 73 | 5b 54 61 72 67 65 74 49 |Controls|[TargetI|
|000013d0| 6e 64 65 78 5d 2e 41 63 | 74 75 61 6c 48 65 69 67 |ndex].Ac|tualHeig|
|000013e0| 68 74 28 29 3b 0d 0a 0d | 0a 20 20 20 20 73 77 69 |ht();...|. swi|
|000013f0| 74 63 68 20 28 6d 6f 64 | 65 29 0d 0a 20 20 20 20 |tch (mod|e).. |
|00001400| 7b 0d 0a 20 20 20 20 09 | 63 61 73 65 20 30 20 3a |{.. .|case 0 :|
|00001410| 09 2f 2f 20 55 70 0d 0a | 20 20 20 20 20 20 20 20 |.// Up..| |
|00001420| 09 72 65 74 75 72 6e 20 | 28 74 59 32 20 3c 3d 20 |.return |(tY2 <= |
|00001430| 73 59 31 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 20 |sY1);.. | |
|00001440| 20 20 20 62 72 65 61 6b | 3b 0d 0a 20 20 20 20 20 | break|;.. |
|00001450| 20 20 20 63 61 73 65 20 | 31 20 3a 09 2f 2f 20 44 | case |1 :.// D|
|00001460| 6f 77 6e 0d 0a 20 20 20 | 20 20 20 20 20 09 72 65 |own.. | .re|
|00001470| 74 75 72 6e 20 28 74 59 | 31 20 3e 3d 20 73 59 32 |turn (tY|1 >= sY2|
|00001480| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |);.. | |
|00001490| 62 72 65 61 6b 3b 0d 0a | 0d 0a 20 20 20 20 20 20 |break;..|.. |
|000014a0| 20 20 63 61 73 65 20 32 | 20 3a 20 09 2f 2f 20 4c | case 2| : .// L|
|000014b0| 65 66 74 0d 0a 20 20 20 | 20 20 20 20 20 09 72 65 |eft.. | .re|
|000014c0| 74 75 72 6e 20 28 74 58 | 32 20 3c 3d 20 73 58 31 |turn (tX|2 <= sX1|
|000014d0| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |);.. | |
|000014e0| 62 72 65 61 6b 3b 0d 0a | 20 20 20 20 20 20 20 20 |break;..| |
|000014f0| 63 61 73 65 20 33 20 3a | 09 2f 2f 20 52 69 67 68 |case 3 :|.// Righ|
|00001500| 74 0d 0a 20 20 20 20 20 | 20 20 20 09 72 65 74 75 |t.. | .retu|
|00001510| 72 6e 20 28 74 58 31 20 | 3e 3d 20 73 58 32 29 3b |rn (tX1 |>= sX2);|
|00001520| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 62 72 |.. | br|
|00001530| 65 61 6b 3b 0d 0a 09 7d | 0d 0a 0d 0a 20 20 20 20 |eak;...}|.... |
|00001540| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 3b 0d 0a 7d |return f|alse;..}|
|00001550| 0d 0a 0d 0a 0d 0a 66 75 | 6e 63 74 69 6f 6e 20 4d |......fu|nction M|
|00001560| 61 70 43 6f 6e 74 72 6f | 6c 73 28 29 0d 0a 7b 0d |apContro|ls()..{.|
|00001570| 0a 09 6c 6f 63 61 6c 20 | 69 6e 74 20 63 2c 69 2c |..local |int c,i,|
|00001580| 70 3b 0d 0a 20 20 20 20 | 6c 6f 63 61 6c 20 66 6c |p;.. |local fl|
|00001590| 6f 61 74 20 63 64 2c 64 | 69 73 74 3b 0d 0a 20 20 |oat cd,d|ist;.. |
|000015a0| 20 20 6c 6f 63 61 6c 20 | 47 55 49 43 6f 6d 70 6f | local |GUICompo|
|000015b0| 6e 65 6e 74 20 43 6c 6f | 73 65 73 74 3b 0d 0a 0d |nent Clo|sest;...|
|000015c0| 0a 20 20 20 20 66 6f 72 | 20 28 63 3d 30 3b 63 3c |. for| (c=0;c<|
|000015d0| 43 6f 6e 74 72 6f 6c 73 | 2e 4c 65 6e 67 74 68 3b |Controls|.Length;|
|000015e0| 63 2b 2b 29 0d 0a 20 20 | 20 20 7b 0d 0a 20 20 20 |c++).. | {.. |
|000015f0| 20 09 69 66 20 28 21 43 | 6f 6e 74 72 6f 6c 73 5b | .if (!C|ontrols[|
|00001600| 63 5d 2e 62 4e 65 76 65 | 72 46 6f 63 75 73 29 0d |c].bNeve|rFocus).|
|00001610| 0a 20 20 20 20 20 20 20 | 20 7b 0d 0a 0d 0a 09 20 |. | {..... |
|00001620| 20 20 20 20 20 20 20 66 | 6f 72 20 28 70 3d 30 3b | f|or (p=0;|
|00001630| 70 3c 34 3b 70 2b 2b 29 | 0d 0a 09 20 20 20 20 20 |p<4;p++)|... |
|00001640| 20 20 20 7b 0d 0a 09 20 | 20 20 20 20 20 20 20 20 | {... | |
|00001650| 20 20 20 43 6c 6f 73 65 | 73 74 20 3d 20 6e 6f 6e | Close|st = non|
|00001660| 65 3b 0d 0a 09 20 20 20 | 20 20 20 20 20 20 20 20 |e;... | |
|00001670| 20 69 66 20 28 43 6f 6e | 74 72 6f 6c 73 5b 63 5d | if (Con|trols[c]|
|00001680| 2e 4c 69 6e 6b 4f 76 65 | 72 72 69 64 65 73 5b 70 |.LinkOve|rrides[p|
|00001690| 5d 21 3d 4e 6f 6e 65 29 | 0d 0a 09 20 20 20 20 20 |]!=None)|... |
|000016a0| 20 20 20 20 20 20 20 20 | 20 20 20 43 6f 6e 74 72 | | Contr|
|000016b0| 6f 6c 73 5b 63 5d 2e 4c | 69 6e 6b 73 5b 70 5d 20 |ols[c].L|inks[p] |
|000016c0| 3d 20 43 6f 6e 74 72 6f | 6c 73 5b 63 5d 2e 4c 69 |= Contro|ls[c].Li|
|000016d0| 6e 6b 4f 76 65 72 72 69 | 64 65 73 5b 70 5d 3b 0d |nkOverri|des[p];.|
|000016e0| 0a 09 20 20 20 20 20 20 | 20 20 20 20 20 20 65 6c |.. | el|
|000016f0| 73 65 0d 0a 09 20 20 20 | 20 20 20 20 20 20 20 20 |se... | |
|00001700| 20 7b 0d 0a 09 20 20 20 | 20 20 20 20 20 20 20 20 | {... | |
|00001710| 20 20 20 20 20 66 6f 72 | 20 28 69 3d 30 3b 69 3c | for| (i=0;i<|
|00001720| 43 6f 6e 74 72 6f 6c 73 | 2e 4c 65 6e 67 74 68 3b |Controls|.Length;|
|00001730| 69 2b 2b 29 0d 0a 09 20 | 20 20 20 20 20 20 20 20 |i++)... | |
|00001740| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 20 | | if ( |
|00001750| 54 65 73 74 43 6f 6e 74 | 72 6f 6c 73 28 70 2c 63 |TestCont|rols(p,c|
|00001760| 2c 69 29 20 29 0d 0a 09 | 20 20 20 20 20 20 20 20 |,i) )...| |
|00001770| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 0d 0a 09 | | {...|
|00001780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001790| 20 20 20 20 20 20 20 20 | 64 69 73 74 20 3d 20 46 | |dist = F|
|000017a0| 69 6e 64 44 69 73 74 28 | 43 6f 6e 74 72 6f 6c 73 |indDist(|Controls|
|000017b0| 5b 63 5d 2c 43 6f 6e 74 | 72 6f 6c 73 5b 69 5d 29 |[c],Cont|rols[i])|
|000017c0| 3b 0d 0a 09 20 20 20 20 | 20 20 20 20 20 20 20 20 |;... | |
|000017d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 69 66 20 28 | | if (|
|000017e0| 20 28 43 6c 6f 73 65 73 | 74 20 3d 3d 20 4e 6f 6e | (Closes|t == Non|
|000017f0| 65 29 20 7c 7c 20 28 64 | 69 73 74 20 3c 20 63 64 |e) || (d|ist < cd|
|00001800| 29 20 29 0d 0a 09 20 20 | 20 20 20 20 20 20 20 20 |) )... | |
|00001810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 0d | | {.|
|00001820| 0a 09 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00001830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 43 6c | | Cl|
|00001840| 6f 73 65 73 74 20 3d 20 | 43 6f 6e 74 72 6f 6c 73 |osest = |Controls|
|00001850| 5b 69 5d 3b 0d 0a 09 20 | 20 20 20 20 20 20 20 20 |[i];... | |
|00001860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001870| 20 20 20 63 64 20 3d 20 | 64 69 73 74 3b 0d 0a 09 | cd = |dist;...|
|00001880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001890| 20 20 20 20 20 20 20 20 | 7d 0d 0a 09 20 20 20 20 | |}... |
|000018a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000018b0| 7d 0d 0a 09 20 20 20 20 | 20 20 20 20 20 20 20 20 |}... | |
|000018c0| 20 20 20 20 43 6f 6e 74 | 72 6f 6c 73 5b 63 5d 2e | Cont|rols[c].|
|000018d0| 4c 69 6e 6b 73 5b 70 5d | 20 3d 20 43 6c 6f 73 65 |Links[p]| = Close|
|000018e0| 73 74 3b 0d 0a 09 20 20 | 20 20 20 20 20 20 20 20 |st;... | |
|000018f0| 20 20 7d 0d 0a 09 20 20 | 20 20 20 20 20 20 7d 0d | }... | }.|
|00001900| 0a 20 20 20 20 20 20 20 | 20 7d 0d 0a 20 20 20 20 |. | }.. |
|00001910| 7d 0d 0a 7d 0d 0a 0d 0a | 0d 0a 2f 2f 20 52 65 6d |}..}....|..// Rem|
|00001920| 61 70 43 6f 6d 70 6f 6e | 65 6e 74 73 20 2d 20 54 |apCompon|ents - T|
|00001930| 68 69 73 20 73 65 74 73 | 20 74 68 65 20 74 61 62 |his sets| the tab|
|00001940| 20 6f 72 64 65 72 20 66 | 6f 72 20 61 6c 6c 20 74 | order f|or all t|
|00001950| 68 65 20 63 6f 6d 70 6f | 6e 65 6e 74 73 20 6f 6e |he compo|nents on|
|00001960| 20 74 68 69 73 20 70 61 | 67 65 0d 0a 65 76 65 6e | this pa|ge..even|
|00001970| 74 20 52 65 6d 61 70 43 | 6f 6d 70 6f 6e 65 6e 74 |t RemapC|omponent|
|00001980| 73 28 29 0d 0a 7b 0d 0a | 09 6c 6f 63 61 6c 20 69 |s()..{..|.local i|
|00001990| 6e 74 20 69 2c 6a 3b 0d | 0a 0d 0a 2f 2f 20 52 65 |nt i,j;.|...// Re|
|000019a0| 6d 6f 76 65 20 66 72 6f | 6d 20 30 20 69 6e 73 74 |move fro|m 0 inst|
|000019b0| 65 61 64 20 6f 66 20 31 | 2c 20 69 6e 20 63 61 73 |ead of 1|, in cas|
|000019c0| 65 20 63 6f 6e 74 72 6f | 6c 20 77 61 73 20 72 65 |e contro|l was re|
|000019d0| 6d 6f 76 65 64 2c 20 61 | 6e 64 20 74 68 61 74 20 |moved, a|nd that |
|000019e0| 63 6f 6e 74 72 6f 6c 20 | 77 61 73 20 63 6f 6d 70 |control |was comp|
|000019f0| 6f 6e 65 6e 74 73 5b 30 | 5d 0d 0a 2f 2f 20 4f 74 |onents[0|]..// Ot|
|00001a00| 68 65 72 77 69 73 65 2c | 20 67 65 74 20 61 63 63 |herwise,| get acc|
|00001a10| 65 73 73 20 6e 6f 6e 65 | 73 0d 0a 09 69 66 20 28 |ess none|s...if (|
|00001a20| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 4c 65 6e 67 74 |Componen|ts.Lengt|
|00001a30| 68 3e 30 29 0d 0a 09 20 | 09 43 6f 6d 70 6f 6e 65 |h>0)... |.Compone|
|00001a40| 6e 74 73 2e 52 65 6d 6f | 76 65 28 30 2c 43 6f 6d |nts.Remo|ve(0,Com|
|00001a50| 70 6f 6e 65 6e 74 73 2e | 4c 65 6e 67 74 68 29 3b |ponents.|Length);|
|00001a60| 09 2f 2f 20 43 6c 65 61 | 72 20 74 68 65 20 43 6f |.// Clea|r the Co|
|00001a70| 6d 70 6f 6e 65 6e 74 20 | 41 72 72 61 79 0d 0a 0d |mponent |Array...|
|00001a80| 0a 09 66 6f 72 20 28 69 | 3d 30 3b 69 3c 43 6f 6e |..for (i|=0;i<Con|
|00001a90| 74 72 6f 6c 73 2e 4c 65 | 6e 67 74 68 3b 69 2b 2b |trols.Le|ngth;i++|
|00001aa0| 29 0d 0a 20 20 20 20 7b | 0d 0a 20 20 20 20 09 69 |).. {|.. .i|
|00001ab0| 66 20 28 43 6f 6e 74 72 | 6f 6c 73 5b 69 5d 2e 62 |f (Contr|ols[i].b|
|00001ac0| 54 61 62 53 74 6f 70 29 | 0d 0a 20 20 20 20 20 20 |TabStop)|.. |
|00001ad0| 20 20 7b 0d 0a 20 20 20 | 20 20 20 20 20 09 66 6f | {.. | .fo|
|00001ae0| 72 20 28 6a 3d 30 3b 6a | 3c 43 6f 6d 70 6f 6e 65 |r (j=0;j|<Compone|
|00001af0| 6e 74 73 2e 4c 65 6e 67 | 74 68 3b 6a 2b 2b 29 0d |nts.Leng|th;j++).|
|00001b00| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 09 69 66 |. | .if|
|00001b10| 20 28 20 43 6f 6e 74 72 | 6f 6c 73 5b 69 5d 2e 54 | ( Contr|ols[i].T|
|00001b20| 61 62 4f 72 64 65 72 20 | 3c 3d 20 43 6f 6d 70 6f |abOrder |<= Compo|
|00001b30| 6e 65 6e 74 73 5b 6a 5d | 2e 54 61 62 4f 72 64 65 |nents[j]|.TabOrde|
|00001b40| 72 20 29 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |r ).. | |
|00001b50| 20 20 20 20 20 20 20 20 | 20 62 72 65 61 6b 3b 0d | | break;.|
|00001b60| 0a 0d 0a 09 09 09 69 66 | 20 28 6a 20 3c 20 43 6f |......if| (j < Co|
|00001b70| 6d 70 6f 6e 65 6e 74 73 | 2e 4c 65 6e 67 74 68 29 |mponents|.Length)|
|00001b80| 0d 0a 09 09 09 09 43 6f | 6d 70 6f 6e 65 6e 74 73 |......Co|mponents|
|00001b90| 2e 49 6e 73 65 72 74 28 | 6a 2c 20 31 29 3b 0d 0a |.Insert(|j, 1);..|
|00001ba0| 0d 0a 09 09 09 43 6f 6d | 70 6f 6e 65 6e 74 73 5b |.....Com|ponents[|
|00001bb0| 6a 5d 20 3d 20 43 6f 6e | 74 72 6f 6c 73 5b 69 5d |j] = Con|trols[i]|
|00001bc0| 3b 0d 0a 20 20 20 20 20 | 20 20 20 20 7d 0d 0a 20 |;.. | }.. |
|00001bd0| 20 20 20 7d 0d 0a 7d 0d | 0a 0d 0a 65 76 65 6e 74 | }..}.|...event|
|00001be0| 20 53 65 74 46 6f 63 75 | 73 28 47 55 49 43 6f 6d | SetFocu|s(GUICom|
|00001bf0| 70 6f 6e 65 6e 74 20 57 | 68 6f 29 0d 0a 7b 0d 0a |ponent W|ho)..{..|
|00001c00| 09 69 66 20 28 57 68 6f | 3d 3d 4e 6f 6e 65 29 0d |.if (Who|==None).|
|00001c10| 0a 09 7b 0d 0a 09 09 46 | 6f 63 75 73 46 69 72 73 |..{....F|ocusFirs|
|00001c20| 74 28 4e 6f 6e 65 29 3b | 0d 0a 09 09 72 65 74 75 |t(None);|....retu|
|00001c30| 72 6e 3b 0d 0a 09 7d 0d | 0a 09 65 6c 73 65 0d 0a |rn;...}.|..else..|
|00001c40| 09 09 46 6f 63 75 73 65 | 64 43 6f 6e 74 72 6f 6c |..Focuse|dControl|
|00001c50| 20 3d 20 57 68 6f 3b 0d | 0a 0d 0a 09 4d 65 6e 75 | = Who;.|....Menu|
|00001c60| 53 74 61 74 65 43 68 61 | 6e 67 65 28 4d 53 41 54 |StateCha|nge(MSAT|
|00001c70| 5f 46 6f 63 75 73 65 64 | 29 3b 0d 0a 0d 0a 09 69 |_Focused|);.....i|
|00001c80| 66 20 28 4d 65 6e 75 4f | 77 6e 65 72 21 3d 4e 6f |f (MenuO|wner!=No|
|00001c90| 6e 65 29 0d 0a 09 09 4d | 65 6e 75 4f 77 6e 65 72 |ne)....M|enuOwner|
|00001ca0| 2e 53 65 74 46 6f 63 75 | 73 28 73 65 6c 66 29 3b |.SetFocu|s(self);|
|00001cb0| 0d 0a 7d 0d 0a 0d 0a 65 | 76 65 6e 74 20 4c 6f 73 |..}....e|vent Los|
|00001cc0| 65 46 6f 63 75 73 28 47 | 55 49 43 6f 6d 70 6f 6e |eFocus(G|UICompon|
|00001cd0| 65 6e 74 20 53 65 6e 64 | 65 72 29 0d 0a 7b 0d 0a |ent Send|er)..{..|
|00001ce0| 09 46 6f 63 75 73 65 64 | 43 6f 6e 74 72 6f 6c 20 |.Focused|Control |
|00001cf0| 3d 20 4e 6f 6e 65 3b 0d | 0a 09 53 75 70 65 72 2e |= None;.|..Super.|
|00001d00| 4c 6f 73 65 46 6f 63 75 | 73 28 53 65 6e 64 65 72 |LoseFocu|s(Sender|
|00001d10| 29 3b 0d 0a 7d 0d 0a 0d | 0a 0d 0a 65 76 65 6e 74 |);..}...|...event|
|00001d20| 20 62 6f 6f 6c 20 46 6f | 63 75 73 46 69 72 73 74 | bool Fo|cusFirst|
|00001d30| 28 47 55 49 43 6f 6d 70 | 6f 6e 65 6e 74 20 53 65 |(GUIComp|onent Se|
|00001d40| 6e 64 65 72 29 0d 0a 7b | 0d 0a 20 20 20 20 6c 6f |nder)..{|.. lo|
|00001d50| 63 61 6c 20 69 6e 74 20 | 69 3b 0d 0a 0d 0a 09 69 |cal int |i;.....i|
|00001d60| 66 20 28 43 6f 6d 70 6f | 6e 65 6e 74 73 2e 4c 65 |f (Compo|nents.Le|
|00001d70| 6e 67 74 68 3e 30 29 0d | 0a 09 7b 0d 0a 20 20 20 |ngth>0).|..{.. |
|00001d80| 20 09 66 6f 72 20 28 69 | 3d 30 3b 69 3c 43 6f 6d | .for (i|=0;i<Com|
|00001d90| 70 6f 6e 65 6e 74 73 2e | 4c 65 6e 67 74 68 3b 69 |ponents.|Length;i|
|00001da0| 2b 2b 29 0d 0a 20 20 20 | 20 20 20 20 20 7b 0d 0a |++).. | {..|
|00001db0| 20 20 20 20 20 20 20 20 | 09 69 66 20 28 43 6f 6d | |.if (Com|
|00001dc0| 70 6f 6e 65 6e 74 73 5b | 69 5d 2e 62 56 69 73 69 |ponents[|i].bVisi|
|00001dd0| 62 6c 65 20 26 26 20 43 | 6f 6d 70 6f 6e 65 6e 74 |ble && C|omponent|
|00001de0| 73 5b 69 5d 2e 4d 65 6e | 75 53 74 61 74 65 20 21 |s[i].Men|uState !|
|00001df0| 3d 20 4d 53 41 54 5f 44 | 69 73 61 62 6c 65 64 29 |= MSAT_D|isabled)|
|00001e00| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 0d |.. | {.|
|00001e10| 0a 09 09 20 20 09 09 43 | 6f 6d 70 6f 6e 65 6e 74 |... ..C|omponent|
|00001e20| 73 5b 69 5d 2e 53 65 74 | 46 6f 63 75 73 28 4e 6f |s[i].Set|Focus(No|
|00001e30| 6e 65 29 3b 0d 0a 09 09 | 09 09 72 65 74 75 72 6e |ne);....|..return|
|00001e40| 20 74 72 75 65 3b 0d 0a | 20 20 20 20 20 20 20 20 | true;..| |
|00001e50| 20 20 20 20 7d 0d 0a 20 | 20 20 20 20 20 20 20 7d | }.. | }|
|00001e60| 0d 0a 20 20 20 20 7d 0d | 0a 0d 0a 09 66 6f 72 20 |.. }.|....for |
|00001e70| 28 69 3d 30 3b 69 3c 43 | 6f 6e 74 72 6f 6c 73 2e |(i=0;i<C|ontrols.|
|00001e80| 4c 65 6e 67 74 68 3b 69 | 2b 2b 29 0d 0a 20 20 20 |Length;i|++).. |
|00001e90| 20 7b 0d 0a 20 20 20 20 | 09 69 66 20 28 20 43 6f | {.. |.if ( Co|
|00001ea0| 6e 74 72 6f 6c 73 5b 69 | 5d 2e 46 6f 63 75 73 46 |ntrols[i|].FocusF|
|00001eb0| 69 72 73 74 28 53 65 6e | 64 65 72 29 20 29 0d 0a |irst(Sen|der) )..|
|00001ec0| 20 20 20 20 20 20 20 20 | 09 72 65 74 75 72 6e 20 | |.return |
|00001ed0| 74 72 75 65 3b 0d 0a 20 | 20 20 20 7d 0d 0a 0d 0a |true;.. | }....|
|00001ee0| 20 20 20 20 72 65 74 75 | 72 6e 20 66 61 6c 73 65 | retu|rn false|
|00001ef0| 3b 0d 0a 7d 0d 0a 0d 0a | 0d 0a 65 76 65 6e 74 20 |;..}....|..event |
|00001f00| 62 6f 6f 6c 20 46 6f 63 | 75 73 4c 61 73 74 28 47 |bool Foc|usLast(G|
|00001f10| 55 49 43 6f 6d 70 6f 6e | 65 6e 74 20 53 65 6e 64 |UICompon|ent Send|
|00001f20| 65 72 29 0d 0a 7b 0d 0a | 09 6c 6f 63 61 6c 20 69 |er)..{..|.local i|
|00001f30| 6e 74 20 69 3b 0d 0a 0d | 0a 09 69 66 20 28 43 6f |nt i;...|..if (Co|
|00001f40| 6d 70 6f 6e 65 6e 74 73 | 2e 4c 65 6e 67 74 68 3e |mponents|.Length>|
|00001f50| 30 29 0d 0a 09 7b 0d 0a | 20 20 20 20 09 66 6f 72 |0)...{..| .for|
|00001f60| 20 28 69 3d 43 6f 6d 70 | 6f 6e 65 6e 74 73 2e 4c | (i=Comp|onents.L|
|00001f70| 65 6e 67 74 68 2d 31 3b | 69 3e 3d 30 3b 69 2d 2d |ength-1;|i>=0;i--|
|00001f80| 29 0d 0a 20 20 20 20 20 | 20 20 20 7b 0d 0a 20 20 |).. | {.. |
|00001f90| 20 20 20 20 20 20 09 69 | 66 20 28 43 6f 6d 70 6f | .i|f (Compo|
|00001fa0| 6e 65 6e 74 73 5b 69 5d | 2e 62 56 69 73 69 62 6c |nents[i]|.bVisibl|
|00001fb0| 65 20 26 26 20 43 6f 6d | 70 6f 6e 65 6e 74 73 5b |e && Com|ponents[|
|00001fc0| 69 5d 2e 4d 65 6e 75 53 | 74 61 74 65 20 21 3d 20 |i].MenuS|tate != |
|00001fd0| 4d 53 41 54 5f 44 69 73 | 61 62 6c 65 64 29 0d 0a |MSAT_Dis|abled)..|
|00001fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 0d 0a 09 | | {...|
|00001ff0| 09 09 09 43 6f 6d 70 6f | 6e 65 6e 74 73 5b 69 5d |...Compo|nents[i]|
|00002000| 2e 53 65 74 46 6f 63 75 | 73 28 4e 6f 6e 65 29 3b |.SetFocu|s(None);|
|00002010| 0d 0a 09 09 09 09 72 65 | 74 75 72 6e 20 74 72 75 |......re|turn tru|
|00002020| 65 3b 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |e;.. | |
|00002030| 7d 0d 0a 20 20 20 20 20 | 20 20 20 7d 0d 0a 09 7d |}.. | }...}|
|00002040| 0d 0a 0d 0a 09 66 6f 72 | 20 28 69 3d 43 6f 6e 74 |.....for| (i=Cont|
|00002050| 72 6f 6c 73 2e 4c 65 6e | 67 74 68 2d 31 3b 69 3e |rols.Len|gth-1;i>|
|00002060| 3d 30 3b 69 2d 2d 29 0d | 0a 20 20 20 20 7b 0d 0a |=0;i--).|. {..|
|00002070| 20 20 20 20 09 69 66 20 | 28 20 43 6f 6e 74 72 6f | .if |( Contro|
|00002080| 6c 73 5b 69 5d 2e 46 6f | 63 75 73 4c 61 73 74 28 |ls[i].Fo|cusLast(|
|00002090| 53 65 6e 64 65 72 29 20 | 29 0d 0a 20 20 20 20 20 |Sender) |).. |
|000020a0| 20 20 20 09 72 65 74 75 | 72 6e 20 74 72 75 65 3b | .retu|rn true;|
|000020b0| 0d 0a 20 20 20 20 7d 0d | 0a 0d 0a 20 20 20 20 72 |.. }.|... r|
|000020c0| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 0a 0d 0a |eturn fa|lse;....|
|000020d0| 7d 0d 0a 0d 0a 65 76 65 | 6e 74 20 62 6f 6f 6c 20 |}....eve|nt bool |
|000020e0| 4e 65 78 74 43 6f 6e 74 | 72 6f 6c 28 47 55 49 43 |NextCont|rol(GUIC|
|000020f0| 6f 6d 70 6f 6e 65 6e 74 | 20 53 65 6e 64 65 72 29 |omponent| Sender)|
|00002100| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 69 6e 74 20 |..{...lo|cal int |
|00002110| 49 6e 64 65 78 3b 0d 0a | 0d 0a 09 49 6e 64 65 78 |Index;..|...Index|
|00002120| 20 3d 20 46 69 6e 64 43 | 6f 6d 70 6f 6e 65 6e 74 | = FindC|omponent|
|00002130| 49 6e 64 65 78 28 53 65 | 6e 64 65 72 29 3b 0d 0a |Index(Se|nder);..|
|00002140| 0d 0a 20 20 20 20 69 66 | 20 28 49 6e 64 65 78 3d |.. if| (Index=|
|00002150| 3d 2d 31 29 0d 0a 20 20 | 20 20 7b 0d 0a 20 20 20 |=-1).. | {.. |
|00002160| 20 09 69 66 20 28 20 53 | 75 70 65 72 2e 4e 65 78 | .if ( S|uper.Nex|
|00002170| 74 43 6f 6e 74 72 6f 6c | 28 53 65 6c 66 29 20 29 |tControl|(Self) )|
|00002180| 0d 0a 20 20 20 20 20 20 | 20 20 09 72 65 74 75 72 |.. | .retur|
|00002190| 6e 20 74 72 75 65 3b 0d | 0a 20 20 20 20 20 20 20 |n true;.|. |
|000021a0| 20 65 6c 73 65 0d 0a 09 | 20 20 20 20 09 72 65 74 | else...| .ret|
|000021b0| 75 72 6e 20 46 6f 63 75 | 73 46 69 72 73 74 28 6e |urn Focu|sFirst(n|
|000021c0| 6f 6e 65 29 3b 0d 0a 20 | 20 20 20 7d 0d 0a 0d 0a |one);.. | }....|
|000021d0| 20 20 20 20 49 6e 64 65 | 78 2b 2b 3b 0d 0a 0d 0a | Inde|x++;....|
|000021e0| 20 20 20 20 2f 2f 20 46 | 69 6e 64 20 74 68 65 20 | // F|ind the |
|000021f0| 6e 65 78 74 20 70 6f 73 | 73 69 62 6c 65 20 63 6f |next pos|sible co|
|00002200| 6d 70 6f 6e 65 6e 74 0d | 0a 20 20 20 20 77 68 69 |mponent.|. whi|
|00002210| 6c 65 20 28 49 6e 64 65 | 78 3c 43 6f 6d 70 6f 6e |le (Inde|x<Compon|
|00002220| 65 6e 74 73 2e 4c 65 6e | 67 74 68 29 0d 0a 20 20 |ents.Len|gth).. |
|00002230| 20 20 7b 0d 0a 20 20 20 | 20 09 69 66 20 28 43 6f | {.. | .if (Co|
|00002240| 6d 70 6f 6e 65 6e 74 73 | 5b 49 6e 64 65 78 5d 2e |mponents|[Index].|
|00002250| 4d 65 6e 75 53 74 61 74 | 65 21 3d 4d 53 41 54 5f |MenuStat|e!=MSAT_|
|00002260| 44 69 73 61 62 6c 65 64 | 20 26 26 20 43 6f 6d 70 |Disabled| && Comp|
|00002270| 6f 6e 65 6e 74 73 5b 49 | 6e 64 65 78 5d 2e 62 56 |onents[I|ndex].bV|
|00002280| 69 73 69 62 6c 65 29 0d | 0a 20 20 20 20 09 7b 0d |isible).|. .{.|
|00002290| 0a 20 20 20 20 20 20 20 | 20 09 43 6f 6d 70 6f 6e |. | .Compon|
|000022a0| 65 6e 74 73 5b 49 6e 64 | 65 78 5d 2e 53 65 74 46 |ents[Ind|ex].SetF|
|000022b0| 6f 63 75 73 28 4e 6f 6e | 65 29 3b 0d 0a 20 20 20 |ocus(Non|e);.. |
|000022c0| 20 20 20 20 20 09 72 65 | 74 75 72 6e 20 74 72 75 | .re|turn tru|
|000022d0| 65 3b 0d 0a 20 20 20 20 | 20 20 20 20 7d 0d 0a 0d |e;.. | }...|
|000022e0| 0a 20 20 20 20 09 49 6e | 64 65 78 2b 2b 3b 0d 0a |. .In|dex++;..|
|000022f0| 20 20 20 20 7d 0d 0a 0d | 0a 20 20 20 09 69 66 20 | }...|. .if |
|00002300| 28 20 53 75 70 65 72 2e | 4e 65 78 74 43 6f 6e 74 |( Super.|NextCont|
|00002310| 72 6f 6c 28 73 65 6c 66 | 29 20 29 0d 0a 20 20 20 |rol(self|) ).. |
|00002320| 20 20 20 20 09 72 65 74 | 75 72 6e 20 74 72 75 65 | .ret|urn true|
|00002330| 3b 0d 0a 20 20 20 20 65 | 6c 73 65 0d 0a 20 20 20 |;.. e|lse.. |
|00002340| 20 20 20 20 09 72 65 74 | 75 72 6e 20 46 6f 63 75 | .ret|urn Focu|
|00002350| 73 46 69 72 73 74 28 6e | 6f 6e 65 29 3b 0d 0a 7d |sFirst(n|one);..}|
|00002360| 0d 0a 0d 0a 65 76 65 6e | 74 20 62 6f 6f 6c 20 50 |....even|t bool P|
|00002370| 72 65 76 43 6f 6e 74 72 | 6f 6c 28 47 55 49 43 6f |revContr|ol(GUICo|
|00002380| 6d 70 6f 6e 65 6e 74 20 | 53 65 6e 64 65 72 29 0d |mponent |Sender).|
|00002390| 0a 7b 0d 0a 0d 0a 09 6c | 6f 63 61 6c 20 69 6e 74 |.{.....l|ocal int|
|000023a0| 20 49 6e 64 65 78 3b 0d | 0a 0d 0a 09 49 6e 64 65 | Index;.|....Inde|
|000023b0| 78 20 3d 20 46 69 6e 64 | 43 6f 6d 70 6f 6e 65 6e |x = Find|Componen|
|000023c0| 74 49 6e 64 65 78 28 53 | 65 6e 64 65 72 29 3b 0d |tIndex(S|ender);.|
|000023d0| 0a 0d 0a 20 20 20 20 69 | 66 20 28 49 6e 64 65 78 |... i|f (Index|
|000023e0| 3d 3d 2d 31 29 0d 0a 20 | 20 20 20 7b 0d 0a 20 20 |==-1).. | {.. |
|000023f0| 20 20 09 69 66 20 28 20 | 53 75 70 65 72 2e 50 52 | .if ( |Super.PR|
|00002400| 65 76 43 6f 6e 74 72 6f | 6c 28 53 65 6c 66 29 20 |evContro|l(Self) |
|00002410| 29 0d 0a 20 20 20 20 20 | 20 20 20 09 72 65 74 75 |).. | .retu|
|00002420| 72 6e 20 74 72 75 65 3b | 0d 0a 20 20 20 20 20 20 |rn true;|.. |
|00002430| 20 20 65 6c 73 65 0d 0a | 09 20 20 20 20 09 72 65 | else..|. .re|
|00002440| 74 75 72 6e 20 46 6f 63 | 75 73 4c 61 73 74 28 6e |turn Foc|usLast(n|
|00002450| 6f 6e 65 29 3b 0d 0a 09 | 7d 0d 0a 0d 0a 20 20 20 |one);...|}.... |
|00002460| 20 49 6e 64 65 78 2d 2d | 3b 0d 0a 0d 0a 20 20 20 | Index--|;.... |
|00002470| 20 77 68 69 6c 65 20 28 | 49 6e 64 65 78 3e 3d 30 | while (|Index>=0|
|00002480| 29 0d 0a 20 20 20 20 7b | 0d 0a 20 20 20 20 09 69 |).. {|.. .i|
|00002490| 66 20 28 43 6f 6d 70 6f | 6e 65 6e 74 73 5b 49 6e |f (Compo|nents[In|
|000024a0| 64 65 78 5d 2e 4d 65 6e | 75 53 74 61 74 65 21 3d |dex].Men|uState!=|
|000024b0| 4d 53 41 54 5f 44 69 73 | 61 62 6c 65 64 29 0d 0a |MSAT_Dis|abled)..|
|000024c0| 20 20 20 20 20 20 20 20 | 7b 0d 0a 20 20 20 20 20 | |{.. |
|000024d0| 20 20 20 09 43 6f 6d 70 | 6f 6e 65 6e 74 73 5b 49 | .Comp|onents[I|
|000024e0| 6e 64 65 78 5d 2e 53 65 | 74 46 6f 63 75 73 28 4e |ndex].Se|tFocus(N|
|000024f0| 6f 6e 65 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 20 |one);.. | |
|00002500| 20 20 20 72 65 74 75 72 | 6e 20 74 72 75 65 3b 0d | retur|n true;.|
|00002510| 0a 20 20 20 20 20 20 20 | 20 7d 0d 0a 0d 0a 20 20 |. | }.... |
|00002520| 20 20 20 20 20 20 49 6e | 64 65 78 2d 2d 3b 0d 0a | In|dex--;..|
|00002530| 20 20 20 20 7d 0d 0a 0d | 0a 20 20 20 20 69 66 20 | }...|. if |
|00002540| 28 20 53 75 70 65 72 2e | 50 72 65 76 43 6f 6e 74 |( Super.|PrevCont|
|00002550| 72 6f 6c 28 73 65 6c 66 | 29 20 29 0d 0a 20 20 20 |rol(self|) ).. |
|00002560| 20 20 20 20 09 72 65 74 | 75 72 6e 20 74 72 75 65 | .ret|urn true|
|00002570| 3b 0d 0a 20 20 20 20 65 | 6c 73 65 0d 0a 20 20 20 |;.. e|lse.. |
|00002580| 20 20 20 20 09 72 65 74 | 75 72 6e 20 46 6f 63 75 | .ret|urn Focu|
|00002590| 73 4c 61 73 74 28 6e 6f | 6e 65 29 3b 0d 0a 0d 0a |sLast(no|ne);....|
|000025a0| 7d 0d 0a 0d 0a 66 75 6e | 63 74 69 6f 6e 20 73 74 |}....fun|ction st|
|000025b0| 72 69 6e 67 20 4c 6f 61 | 64 49 4e 49 28 29 0d 0a |ring Loa|dINI()..|
|000025c0| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 69 6e 74 20 69 3b |{...loca|l int i;|
|000025d0| 0d 0a 0d 0a 09 66 6f 72 | 20 28 69 3d 30 3b 69 3c |.....for| (i=0;i<|
|000025e0| 43 6f 6e 74 72 6f 6c 73 | 2e 4c 65 6e 67 74 68 3b |Controls|.Length;|
|000025f0| 69 2b 2b 29 0d 0a 09 09 | 43 6f 6e 74 72 6f 6c 73 |i++)....|Controls|
|00002600| 5b 69 5d 2e 4c 6f 61 64 | 49 4e 49 28 29 3b 0d 0a |[i].Load|INI();..|
|00002610| 0d 0a 09 72 65 74 75 72 | 6e 20 53 75 70 65 72 2e |...retur|n Super.|
|00002620| 4c 6f 61 64 49 4e 49 28 | 29 3b 0d 0a 7d 0d 0a 0d |LoadINI(|);..}...|
|00002630| 0a 66 75 6e 63 74 69 6f | 6e 20 53 61 76 65 49 4e |.functio|n SaveIN|
|00002640| 49 28 73 74 72 69 6e 67 | 20 56 61 6c 75 65 29 0d |I(string| Value).|
|00002650| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 69 6e 74 20 69 |.{...loc|al int i|
|00002660| 3b 0d 0a 0d 0a 09 66 6f | 72 20 28 69 3d 30 3b 69 |;.....fo|r (i=0;i|
|00002670| 3c 43 6f 6e 74 72 6f 6c | 73 2e 4c 65 6e 67 74 68 |<Control|s.Length|
|00002680| 3b 69 2b 2b 29 0d 0a 09 | 09 43 6f 6e 74 72 6f 6c |;i++)...|.Control|
|00002690| 73 5b 69 5d 2e 53 61 76 | 65 49 4e 49 28 22 22 29 |s[i].Sav|eINI("")|
|000026a0| 3b 0d 0a 0d 0a 09 53 75 | 70 65 72 2e 53 61 76 65 |;.....Su|per.Save|
|000026b0| 49 4e 49 28 56 61 6c 75 | 65 29 3b 0d 0a 0d 0a 09 |INI(Valu|e);.....|
|000026c0| 72 65 74 75 72 6e 3b 0d | 0a 7d 0d 0a 0d 0a 65 76 |return;.|.}....ev|
|000026d0| 65 6e 74 20 4d 65 6e 75 | 53 74 61 74 65 43 68 61 |ent Menu|StateCha|
|000026e0| 6e 67 65 28 65 4d 65 6e | 75 53 74 61 74 65 20 4e |nge(eMen|uState N|
|000026f0| 65 77 73 74 61 74 65 29 | 0d 0a 7b 0d 0a 0d 0a 09 |ewstate)|..{.....|
|00002700| 6c 6f 63 61 6c 20 69 6e | 74 20 69 3b 0d 0a 0d 0a |local in|t i;....|
|00002710| 09 69 66 20 28 4e 65 77 | 53 74 61 74 65 3d 3d 4d |.if (New|State==M|
|00002720| 53 41 54 5f 44 69 73 61 | 62 6c 65 64 29 0d 0a 09 |SAT_Disa|bled)...|
|00002730| 7b 0d 0a 09 09 66 6f 72 | 20 28 69 3d 30 3b 69 3c |{....for| (i=0;i<|
|00002740| 43 6f 6e 74 72 6f 6c 73 | 2e 4c 65 6e 67 74 68 3b |Controls|.Length;|
|00002750| 69 2b 2b 29 0d 0a 09 09 | 09 43 6f 6e 74 72 6f 6c |i++)....|.Control|
|00002760| 73 5b 69 5d 2e 4d 65 6e | 75 53 74 61 74 65 43 68 |s[i].Men|uStateCh|
|00002770| 61 6e 67 65 28 4d 53 41 | 54 5f 44 69 73 61 62 6c |ange(MSA|T_Disabl|
|00002780| 65 64 29 3b 0d 0a 09 7d | 0d 0a 09 65 6c 73 65 0d |ed);...}|...else.|
|00002790| 0a 09 7b 0d 0a 09 09 66 | 6f 72 20 28 69 3d 30 3b |..{....f|or (i=0;|
|000027a0| 69 3c 43 6f 6e 74 72 6f | 6c 73 2e 4c 65 6e 67 74 |i<Contro|ls.Lengt|
|000027b0| 68 3b 69 2b 2b 29 0d 0a | 09 09 09 69 66 20 28 43 |h;i++)..|...if (C|
|000027c0| 6f 6e 74 72 6f 6c 73 5b | 69 5d 2e 4d 65 6e 75 53 |ontrols[|i].MenuS|
|000027d0| 74 61 74 65 3d 3d 4d 53 | 41 54 5f 44 69 73 61 62 |tate==MS|AT_Disab|
|000027e0| 6c 65 64 29 0d 0a 09 09 | 09 09 43 6f 6e 74 72 6f |led)....|..Contro|
|000027f0| 6c 73 5b 69 5d 2e 4d 65 | 6e 75 53 74 61 74 65 43 |ls[i].Me|nuStateC|
|00002800| 68 61 6e 67 65 28 4d 53 | 41 54 5f 42 6c 75 72 72 |hange(MS|AT_Blurr|
|00002810| 79 29 3b 0d 0a 09 7d 0d | 0a 0d 0a 09 53 75 70 65 |y);...}.|....Supe|
|00002820| 72 2e 4d 65 6e 75 53 74 | 61 74 65 43 68 61 6e 67 |r.MenuSt|ateChang|
|00002830| 65 28 4e 65 77 53 74 61 | 74 65 29 3b 0d 0a 7d 0d |e(NewSta|te);..}.|
|00002840| 0a 0d 0a 65 76 65 6e 74 | 20 53 65 74 56 69 73 69 |...event| SetVisi|
|00002850| 62 69 6c 69 74 79 28 62 | 6f 6f 6c 20 62 49 73 56 |bility(b|ool bIsV|
|00002860| 69 73 69 62 6c 65 29 0d | 0a 7b 0d 0a 09 6c 6f 63 |isible).|.{...loc|
|00002870| 61 6c 20 69 6e 74 20 69 | 3b 0d 0a 0d 0a 09 53 75 |al int i|;.....Su|
|00002880| 70 65 72 2e 53 65 74 56 | 69 73 69 62 69 6c 69 74 |per.SetV|isibilit|
|00002890| 79 28 62 49 73 56 69 73 | 69 62 6c 65 29 3b 0d 0a |y(bIsVis|ible);..|
|000028a0| 0d 0a 20 20 20 20 69 66 | 20 28 20 21 50 72 6f 70 |.. if| ( !Prop|
|000028b0| 61 67 61 74 65 56 69 73 | 69 62 69 6c 69 74 79 20 |agateVis|ibility |
|000028c0| 29 0d 0a 20 20 20 20 09 | 72 65 74 75 72 6e 3b 0d |).. .|return;.|
|000028d0| 0a 0d 0a 20 20 20 20 66 | 6f 72 20 28 69 3d 30 3b |... f|or (i=0;|
|000028e0| 69 3c 43 6f 6e 74 72 6f | 6c 73 2e 4c 65 6e 67 74 |i<Contro|ls.Lengt|
|000028f0| 68 3b 69 2b 2b 29 0d 0a | 20 20 20 20 09 43 6f 6e |h;i++)..| .Con|
|00002900| 74 72 6f 6c 73 5b 69 5d | 2e 53 65 74 56 69 73 69 |trols[i]|.SetVisi|
|00002910| 62 69 6c 69 74 79 28 62 | 49 73 56 69 73 69 62 6c |bility(b|IsVisibl|
|00002920| 65 29 3b 0d 0a 7d 0d 0a | 0d 0a 65 76 65 6e 74 20 |e);..}..|..event |
|00002930| 4f 70 65 6e 65 64 28 47 | 55 49 43 6f 6d 70 6f 6e |Opened(G|UICompon|
|00002940| 65 6e 74 20 53 65 6e 64 | 65 72 29 0d 0a 7b 0d 0a |ent Send|er)..{..|
|00002950| 09 6c 6f 63 61 6c 20 69 | 6e 74 20 69 3b 0d 0a 0d |.local i|nt i;...|
|00002960| 0a 20 20 20 20 66 6f 72 | 20 28 69 3d 30 3b 69 3c |. for| (i=0;i<|
|00002970| 43 6f 6e 74 72 6f 6c 73 | 2e 4c 65 6e 67 74 68 3b |Controls|.Length;|
|00002980| 69 2b 2b 29 0d 0a 20 20 | 20 20 09 43 6f 6e 74 72 |i++).. | .Contr|
|00002990| 6f 6c 73 5b 69 5d 2e 4f | 70 65 6e 65 64 28 53 65 |ols[i].O|pened(Se|
|000029a0| 6e 64 65 72 29 3b 0d 0a | 7d 0d 0a 0d 0a 65 76 65 |nder);..|}....eve|
|000029b0| 6e 74 20 43 6c 6f 73 65 | 64 28 47 55 49 43 6f 6d |nt Close|d(GUICom|
|000029c0| 70 6f 6e 65 6e 74 20 53 | 65 6e 64 65 72 2c 20 62 |ponent S|ender, b|
|000029d0| 6f 6f 6c 20 62 43 61 6e | 63 65 6c 6c 65 64 29 0d |ool bCan|celled).|
|000029e0| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 69 6e 74 20 69 |.{...loc|al int i|
|000029f0| 3b 0d 0a 0d 0a 20 20 20 | 20 66 6f 72 20 28 69 3d |;.... | for (i=|
|00002a00| 30 3b 69 3c 43 6f 6e 74 | 72 6f 6c 73 2e 4c 65 6e |0;i<Cont|rols.Len|
|00002a10| 67 74 68 3b 69 2b 2b 29 | 0d 0a 20 20 20 20 09 43 |gth;i++)|.. .C|
|00002a20| 6f 6e 74 72 6f 6c 73 5b | 69 5d 2e 43 6c 6f 73 65 |ontrols[|i].Close|
|00002a30| 64 28 53 65 6e 64 65 72 | 2c 20 62 43 61 6e 63 65 |d(Sender|, bCance|
|00002a40| 6c 6c 65 64 29 3b 0d 0a | 7d 0d 0a 0d 0a 65 76 65 |lled);..|}....eve|
|00002a50| 6e 74 20 46 72 65 65 28 | 29 20 09 09 09 2f 2f 20 |nt Free(|) ...// |
|00002a60| 54 68 69 73 20 63 6f 6e | 74 72 6f 6c 20 69 73 20 |This con|trol is |
|00002a70| 6e 6f 20 6c 6f 6e 67 65 | 72 20 6e 65 65 64 65 64 |no longe|r needed|
|00002a80| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 69 6e 74 20 |..{...lo|cal int |
|00002a90| 69 3b 0d 0a 0d 0a 20 20 | 20 20 66 6f 72 20 28 69 |i;.... | for (i|
|00002aa0| 3d 30 3b 69 3c 43 6f 6e | 74 72 6f 6c 73 2e 4c 65 |=0;i<Con|trols.Le|
|00002ab0| 6e 67 74 68 3b 69 2b 2b | 29 0d 0a 20 20 20 20 7b |ngth;i++|).. {|
|00002ac0| 0d 0a 20 20 20 20 09 43 | 6f 6e 74 72 6f 6c 73 5b |.. .C|ontrols[|
|00002ad0| 69 5d 2e 46 72 65 65 28 | 29 3b 0d 0a 20 20 20 20 |i].Free(|);.. |
|00002ae0| 20 20 20 20 43 6f 6e 74 | 72 6f 6c 73 5b 69 5d 20 | Cont|rols[i] |
|00002af0| 3d 20 4e 6f 6e 65 3b 0d | 0a 20 20 20 20 7d 0d 0a |= None;.|. }..|
|00002b00| 0d 0a 20 20 20 20 66 6f | 72 20 28 69 3d 30 3b 69 |.. fo|r (i=0;i|
|00002b10| 3c 43 6f 6d 70 6f 6e 65 | 6e 74 73 2e 4c 65 6e 67 |<Compone|nts.Leng|
|00002b20| 74 68 3b 69 2b 2b 29 0d | 0a 20 20 20 20 09 43 6f |th;i++).|. .Co|
|00002b30| 6d 70 6f 6e 65 6e 74 73 | 5b 69 5d 20 3d 20 4e 6f |mponents|[i] = No|
|00002b40| 6e 65 3b 0d 0a 0d 0a 09 | 46 6f 63 75 73 65 64 43 |ne;.....|FocusedC|
|00002b50| 6f 6e 74 72 6f 6c 20 3d | 20 4e 6f 6e 65 3b 0d 0a |ontrol =| None;..|
|00002b60| 20 20 20 20 53 75 70 65 | 72 2e 46 72 65 65 28 29 | Supe|r.Free()|
|00002b70| 3b 0d 0a 7d 0d 0a 0d 0a | 00 |;..}....|. |
+--------+-------------------------+-------------------------+--------+--------+